/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Structures;

import java.io.Serializable;

/**
 *
 * @author Mariusz
 */
public class Product implements Serializable{
    private String name;
    private float price;
    private float amount;

    public float getAmount() {
        return amount;
    }

    public String getName() {
        return name;
    }

    public float getPrice() {
        return price;
    }

    public float getPricePerKG() {
        return price/amount;
    }

    public Product(String n, float p, float a) {
        name = n;
        price = p;
        amount = a;
    }

    @Override
    public String toString(){
        return "Nazwa produktu:" + name + " Cena:" + price + " Ilość:" + amount + " Cena za kg:" + getPricePerKG();
    }

}
